#ifndef _FONT_H_
#define _FONT_H_

#ifdef _WIN32
#pragma once
#endif

#include <string>

#include "d3dx9.h"

#include "devicemanager.h"
#include "ui_sprite.h"

using std::string;

class CFont
{
public:
    CFont(string szFaceName, string szPath, int nSize=52);
    ~CFont();

    void drawText(CUISprite *pSprite, string szText,
        int nX, int nY,
        D3DCOLOR color=D3DCOLOR_ARGB(0, 0, 0, 255));
    void drawText(string szText,
        int nX, int nY,
        D3DCOLOR color=D3DCOLOR_ARGB(0, 0, 0, 255));
    void drawText(CUISprite *pSprite, string szText,
        LPRECT pRect, D3DCOLOR color=D3DCOLOR_ARGB(0, 0, 0, 255));
    void drawText(string szText,
        LPRECT pRect, D3DCOLOR color=D3DCOLOR_ARGB(0, 0, 0, 255));

private:
    LPD3DXFONT m_pFont;
    string m_szFontPath;
};

#endif